<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>

        let arr = [1, 1, 2, 3, 4, 5, 3, 11, 22]


        let arr1 = [... new Set(arr)]
        // console.log("arr", arr1);

        let arr2 = arr.filter((item, index, self) => {
            return self.indexOf(item) === index

        })
        // console.log(arr2);

        let arr3 = arr.reduce((Arrlist, item) => {
            if (!Arrlist.includes(item)) {
                Arrlist.push(item)
            }
            return Arrlist
        }, [])
        console.log(arr3);

















        // const arr = [1, 2, 3, 3, 4, 5, 5]
        // const SetArr = Array.from(new Set(arr))
        // let uniqueArr = [... new Set(arr)]
        // let Arr1 = arr.filter((item, index, self) => {
        //     return self.indexOf(item) === index
        // })
        // let arr2 = arr.reduce((data, item) => {
        //     // console.log(item);
        //     if (!data.includes(item)) {
        //         data.push(item)
        //     }
        //     return data
        // }, [])
        // console.log(arr2);

    </script>
</body>

</html>